<template>
    <div>
        <van-nav-bar title="账号密码登录" />
        <van-form @submit="onSubmit">
            <van-cell-group inset>
                <van-field v-model="tel" type="tel" label="+86" placeholder="请输入手机号码" />
                <van-field v-model="password" type="password" name="password" label="密码" placeholder="请输入密码"
                    :rules="[{ required: true, message: '请填写密码' }]" />

            </van-cell-group>
            <div style="margin: 16px;">
                <van-button round block type="primary" native-type="submit">
                    登录
                </van-button>

                <div>
                    <van-checkbox-group v-model="checked" shape="square">
                        <van-checkbox name="a">我同意并遵守《使用协议》、《隐私协议》</van-checkbox>
                    </van-checkbox-group>
                </div>
            </div>
        </van-form>
    </div>
</template>

<script setup>
import { ref } from 'vue';
import { useRouter } from 'vue-router'
const router = useRouter()
const checked = ref(['a', 'b']);
const password = ref('');
const onSubmit = (values) => {
   router.push('/home/cla')
};
 const tel = ref('');
</script>

<style lang="scss" scoped></style>